
package com.app.hmst.model;

import java.util.List;

import com.app.hmst.dto.HomestayDto;
import com.roscopeco.ormdroid.Entity;

public class HouseInfoVO extends Entity{
	public int id;
	public String name;
	public String contactName;
	public String tel;
	public String fax;
	public String email;
	public String website;
	public String homestayId;
	public String newHouse;
	public String status;
	
	
	
	public HouseInfoVO() {
		this(null, null, null, null, null, null, null, null, null);
	}



	public HouseInfoVO(String name, String contactName, String tel, String fax,
			String email, String website, String homestayId,String newHouse,String status) {
		this.name = name;
		this.contactName = contactName;
		this.tel = tel;
		this.fax = fax;
		this.email = email;
		this.website = website;
		this.homestayId = homestayId;
		this.newHouse = newHouse;
		this.status = status;
	}
	public int getPk(){
		List<HouseInfoVO> list = null;
		int key = 1;
		list = query(HouseInfoVO.class).executeMulti();
		if(list!=null && !list.isEmpty()){
			key = list.get(list.size()-1).id+1;
		}
		return key;
		
	}
	
	
	
	
	
}
